cmake_minimum_required(VERSION 3.21)
project(cpp_qt_demo)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)

#include_directories(cpp_qt_demo)

# 查找QT的模块
find_package(Qt5 COMPONENTS
        Core
        Gui
        Widgets
        REQUIRED)
# 添加源文件
add_executable(cpp_qt_demo main.cpp)
# 添加模块
target_link_libraries(cpp_qt_demo
        Qt5::Core
        Qt5::Gui
        Qt5::Widgets
        )